package com.luguokong.pet_rescue.mapper;

import com.luguokong.pet_rescue.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    public int insertUser(User user);
    public int deleteUserById(int user_id);
    public int updateUserById(User user);
    public User selectUserById(int user_id);
    public List<User> selectUserAll();
    public User selectUserByPhone(String phone);
    public List<User> selectUserByStarByAsc();

    @Select("select * from users limit #{pageNum},#{pageSize}")
    public List<User> selectUserAllByPageNumByPageSize(int pageNum, int pageSize);

    @Select("select count(*) from users")
    public int selectDataCount();
}
